package com.zou.baidu_music_radio.utils;

import android.content.Context;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;
import com.zou.baidu_music_radio.R;

/**
 * 封装Picasso的图片载入
 * Created by zou on 2016/3/1.
 */
public class ImageUtil {
    public ImageUtil() {
    }

    public static void load(Context context, ImageView imageView, String url) {
        Picasso.with(context).load(url)
                .placeholder(R.mipmap.iconfont_loading).error(R.mipmap.iconfont_cry)
                .resize(500, 500).centerInside()
                .into(imageView);
    }
}
